<nav class="global-nav" role="navigation">

    <a class="nav-item ghost-logo" href="{{gh-path 'blog'}}" title="Visit blog">
        <div class="nav-label"><i class="icon-ghost"></i> <span>访问博客</span> </div>
    </a>

    {{#link-to "posts" classNames="nav-item nav-content js-nav-item"}}
        <div class="nav-label"><i class="icon-content"></i> 博文列表</div>
    {{/link-to}}

    {{#link-to "editor.new" classNames="nav-item nav-new js-nav-item"}}
        <div class="nav-label"><i class="icon-add"></i> 新建博文</div>
    {{/link-to}}

    {{#unless session.user.isAuthor}}
    {{#link-to "settings" classNames="nav-item nav-settings js-nav-item"}}
        <div class="nav-label"><i class="icon-settings2"></i> 博客设置</div>
    {{/link-to}}
    {{/unless}}

    {{! TODO: Mobile-only menu items

    <a class="nav-item thing" href="#">
        <div class="nav-label">Thing</div>
    </a>
    <a class="nav-item thing2" href="#">
        <div class="nav-label">Thing2</div>
    </a>

    }}

    <div class="nav-item user-menu">
        {{#gh-dropdown-button dropdownName="user-menu" tagName="div" classNames="nav-label clearfix"}}
            <span class="image" style={{userImageBackground}}>
                <img src={{userImage}} title={{userImageAlt}}>
            </span>
            <div class="name">
                {{session.user.name}} <i class="icon-chevron-down"></i>
                <small>账号设置</small>
            </div>
        {{/gh-dropdown-button}}
        {{#gh-dropdown tagName="div" classNames="dropdown" name="user-menu" closeOnClick="true"}}
            <ul class="dropdown-menu dropdown-triangle-top-right js-user-menu-dropdown-menu" role="menu">
                 <li role="presentation">{{#link-to "settings.users.user" session.user.slug classNames="dropdown-item user-menu-profile js-nav-item" role="menuitem" tabindex="-1"}}<i class="icon-user"></i> 我的资料{{/link-to}}</li>
                <li class="divider"></li>
                <li role="presentation">{{#link-to "signout" classNames="dropdown-item user-menu-signout" role="menuitem" tabindex="-1"}}<i class="icon-power"></i> 退出登录{{/link-to}}</li>
            </ul>
        {{/gh-dropdown}}
    </div>{{! .user-menu }}

    <div class="nav-item help-menu">
        {{#gh-dropdown-button dropdownName="help-menu" tagName="div" classNames="nav-label clearfix"}}
            <div class="help-button">
                <i class="icon-question"><span class="hidden">Help</span></i>
            </div>
        {{/gh-dropdown-button}}
        {{#gh-dropdown tagName="div" classNames="dropdown" name="help-menu" closeOnClick="true"}}
            <ul class="dropdown-menu dropdown-triangle-top" role="menu">
                
                <li role="presentation"><a class="dropdown-item help-menu-support" role="menuitem" tabindex="-1" href="https://diancloud.com" target="_blank"><i class="icon-link"></i> 点云DianCloud </a></li>

                <li role="presentation"><a class="dropdown-item help-menu-tweet" role="menuitem" tabindex="-1" href="https://diancloud.com/apps"> <i class="icon-weather-cloudy"></i> 云应用商店 </a></li>

                <li class="divider"></li>
                
                <li role="presentation"><a class="dropdown-item help-menu-how-to" role="menuitem" tabindex="-1" href="http://ghost.diancloud.com/doc/zh/usage/" target="_blank"><i class="icon-book"></i> 使用手册 </a></li>

                <li role="presentation"><a href="http://shang.qq.com/wpa/qunwpa?idkey=eb5bc8f9f7444caa1bbdd77c4422b71f6cbda70c21a43f5253653d930c33ea7e" target="_blank" > <i class="icon-users"></i> QQ群 335978388 </a> </li>

            </ul>

        {{/gh-dropdown}}
    </div>{{! .help-menu }}

</nav>{{! .global-nav }}

<div class="nav-cover js-nav-cover"></div>
